package com.erp.erp_entitys.InspectCargo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * 验货商检
 */
@ApiModel(value = "验货商检实体类")
public class InspectCargoEntity {
    /**
     * 主键
     */
    @ApiModelProperty(value = "id")
    private Integer id;

    /**
     * 验货单号
     */
    @ApiModelProperty(value = "验货单号")
    private String oddNumber;

    /**
     * 验货类型
     */
    @ApiModelProperty(value = "验货类型")
    private String inspectType;

    /**
     * 验货地址
     */
    @ApiModelProperty(value = "验货地址")
    private String address;

    /**
     * 验货日期
     */
    @ApiModelProperty(value = "验货日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date inspectTime;

    /**
     * 要求期限
     */
    @ApiModelProperty(value = "要求期限")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date timeLimit;

    /**
     * 验货公司
     */
    @ApiModelProperty(value = "验货公司")
    private String company;

    /**
     * 验货费用
     */
    @ApiModelProperty(value = "验货费用")
    private BigDecimal cost;

    /**
     * 验货阶段
     * 0 未验
     * 1 初验（通过）
     * 2 中验（未通过）
     * 3 尾验（未通过）
     */
    @ApiModelProperty(value = "验货阶段")
    private String stage;

    /**
     * 出运计划单号
     */
    @ApiModelProperty(value = "出运计划单号")
    private String loadPlanNo;
    /**
     * 业务员
     */
    @ApiModelProperty(value = "业务员")
    private String inspector;

    /**
     * 操作员
     */
    @ApiModelProperty(value = "操作员")
    private String executor;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
	
	/**
	 * 制单公司
	 */
	@ApiModelProperty(value = "制单公司")
	private String complaintUnit;
	
	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注")
	private String remark;

    /**
     * 箱体状态
     * 1：草稿
     * 2：待批
     * 3：已批
     * 4：完成
     * 5：垃圾
     */
    @ApiModelProperty(value = "箱体状态")
    private String boxStatus;
    /**
     * 审批时间
     */
    @ApiModelProperty(value = "审批时间")
    private Date approveTime;

    /******** 关联数据 ********/
    @ApiModelProperty(value = "产品列表")
    private List<InspectCargoProductEntity> productList;
    @ApiModelProperty(value = "附件列表")
    private List<InspectCargoFileEntity> fileList;

    /**
     * 审批流id
     */
    private String bpmId;
    /**
     * 审批流状态
     */
    private String bpmStatus;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getOddNumber() {
        return oddNumber;
    }

    public void setOddNumber(String oddNumber) {
        this.oddNumber = oddNumber;
    }

    public String getInspectType() {
        return inspectType;
    }

    public void setInspectType(String inspectType) {
        this.inspectType = inspectType;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getInspectTime() {
        return inspectTime;
    }

    public void setInspectTime(Date inspectTime) {
        this.inspectTime = inspectTime;
    }

    public Date getTimeLimit() {
        return timeLimit;
    }

    public void setTimeLimit(Date timeLimit) {
        this.timeLimit = timeLimit;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public BigDecimal getCost() {
        return cost;
    }

    public void setCost(BigDecimal cost) {
        this.cost = cost;
    }

    public String getStage() {
        return stage;
    }

    public void setStage(String stage) {
        this.stage = stage;
    }

    public String getLoadPlanNo() {
        return loadPlanNo;
    }

    public void setLoadPlanNo(String loadPlanNo) {
        this.loadPlanNo = loadPlanNo;
    }

    public String getInspector() {
        return inspector;
    }

    public void setInspector(String inspector) {
        this.inspector = inspector;
    }

    public String getComplaintUnit() {
        return complaintUnit;
    }

    public void setComplaintUnit(String complaintUnit) {
        this.complaintUnit = complaintUnit;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getExecutor() {
        return executor;
    }

    public void setExecutor(String executor) {
        this.executor = executor;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getBoxStatus() {
        return boxStatus;
    }

    public void setBoxStatus(String boxStatus) {
        this.boxStatus = boxStatus;
    }

    public Date getApproveTime() {
        return approveTime;
    }

    public void setApproveTime(Date approveTime) {
        this.approveTime = approveTime;
    }

    public List<InspectCargoProductEntity> getProductList() {
        return productList;
    }

    public void setProductList(List<InspectCargoProductEntity> productList) {
        this.productList = productList;
    }

    public List<InspectCargoFileEntity> getFileList() {
        return fileList;
    }

    public void setFileList(List<InspectCargoFileEntity> fileList) {
        this.fileList = fileList;
    }

    public String getBpmId() {
        return bpmId;
    }

    public void setBpmId(String bpmId) {
        this.bpmId = bpmId;
    }

    public String getBpmStatus() {
        return bpmStatus;
    }

    public void setBpmStatus(String bpmStatus) {
        this.bpmStatus = bpmStatus;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        InspectCargoEntity that = (InspectCargoEntity) o;
        return id.equals(that.id) &&
                Objects.equals(oddNumber, that.oddNumber) &&
                Objects.equals(inspectType, that.inspectType) &&
                Objects.equals(address, that.address) &&
                Objects.equals(inspectTime, that.inspectTime) &&
                Objects.equals(timeLimit, that.timeLimit) &&
                Objects.equals(company, that.company) &&
                Objects.equals(cost, that.cost) &&
                Objects.equals(stage, that.stage) &&
                Objects.equals(loadPlanNo, that.loadPlanNo) &&
                Objects.equals(inspector, that.inspector) &&
                Objects.equals(executor, that.executor) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(complaintUnit, that.complaintUnit) &&
                Objects.equals(remark, that.remark) &&
                Objects.equals(boxStatus, that.boxStatus) &&
                Objects.equals(approveTime, that.approveTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, oddNumber, inspectType, address, inspectTime, timeLimit, company, cost, stage, loadPlanNo, inspector, executor, createTime, complaintUnit, remark, boxStatus, approveTime);
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append(" \"id\":").append(id);
        sb.append(", \"oddNumber\":\"").append(oddNumber).append('\"');
        sb.append(", \"inspectType\":\"").append(inspectType).append('\"');
        sb.append(", \"address\":\"").append(address).append('\"');
        sb.append(", \"inspectTime\":\"").append(inspectTime).append('\"');
        sb.append(", \"timeLimit\":\"").append(timeLimit).append('\"');
        sb.append(", \"company\":\"").append(company).append('\"');
        sb.append(", \"cost\":").append(cost);
        sb.append(", \"stage\":\"").append(stage).append('\"');
        sb.append(", \"loadPlanNo\":\"").append(loadPlanNo).append('\"');
        sb.append(", \"inspector\":\"").append(inspector).append('\"');
        sb.append(", \"executor\":\"").append(executor).append('\"');
        sb.append(", \"createTime\":\"").append(createTime).append('\"');
        sb.append(", \"complaintUnit\":\"").append(complaintUnit).append('\"');
        sb.append(", \"remark\":\"").append(remark).append('\"');
        sb.append(", \"boxStatus\":\"").append(boxStatus).append('\"');
        sb.append(", \"approveTime\":\"").append(approveTime).append('\"');
        sb.append(", \"productList\":").append(productList);
        sb.append(", \"fileList\":").append(fileList);
        sb.append('}');
        return sb.toString();
    }
}